module.exports = (time) =>
  new Promise((resolve, reject) => {
    // return 123;
    if (typeof time !== "number") {
      return reject(new TypeError("time must be a number"));
    }
    return setTimeout(() => resolve(Math.random() * 10), time);
  });
